//用户相关接口统一管理
import request from "@/utils/request.ts";
import type { loginForm, loginResponseData } from "./type.ts";

// mock的接口
enum API {
  LOGIN_URL = "/user/login",
  USERINFO_URL = "/user/info",
}

// 登录
export const reqLogin = (data: loginForm) =>
  request.post<any, loginResponseData>(API.LOGIN_URL, data);
// 用户信息
export const reqUserInfo = () => request.get<any, any>(API.USERINFO_URL);
